from langchain_huggingface import HuggingFaceEmbeddings


class CustomEmbeddings:
    def __init__(self):
        self.embeddings = HuggingFaceEmbeddings(
            model_name="sentence-transformers/all-MiniLM-L6-v2",
            model_kwargs={'device': 'cpu'}
        )
    
    def get_embeddings(self):
        return self.embeddings 